home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: Aug 15 1996
- //
- // Description:
- // This procedure creates the main menu bar with the various
- // menu tabs: Modeling, Animation, Character, Dynamics, Rendering
- //
- // NOTE: If you add menus to any of the categories, remember to update the
- // dimension of the corresponding array (ie: $gAnimationMenus, $gModelingMenus).
- // If you don't, the script won't fail, but providing explicit array sizes ensures
- // that excess memory is not needlessly allocated for the arrays.
- // NOTE: modify to build common menus dynamically, then
- // add the Motif accelerators to the hotkey file.
-
-
- /*
- //////////////////////////////////////////////////
- //
- // Build the CHARACTER menus
- //
- //////////////////////////////////////////////////
-
- global proc genCharacterMenus( )
- {
- global string $gCharacterMenus[];
- int $menuIndex = 0;
-
- $gCharacterMenus[$menuIndex] =
- `menu -l "Deformations" -to true -aob true
- -familyImage "menuIconDeformations.xpm"`;
- menu -e -pmc ( "ChaDeformationsMenu " + $gCharacterMenus[$menuIndex] )
- $gCharacterMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- $gCharacterMenus[$menuIndex] =
- `menu -l "Skeletons" -to true -aob true
- -familyImage "menuIconSkeletons.xpm"`;
- menu -e -pmc ( "ChaSkeletonsMenu " + $gCharacterMenus[$menuIndex] )
- $gCharacterMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- $gCharacterMenus[$menuIndex] =
- `menu -l "Skin" -to true -aob true
- -familyImage "menuIconSkinning.xpm"`;
- menu -e -pmc ( "ChaSkinningMenu " + $gCharacterMenus[$menuIndex] )
- $gCharacterMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- // Reuse the Constraints from the ANIMATION menubar.
- $gCharacterMenus[$menuIndex] =
- `menu -l "Constraints" -to true -aob true
- -familyImage "menuIconConstraints.xpm"`;
- menu -e -pmc ( "AniConstraintsMenu " + $gCharacterMenus[$menuIndex] )
- $gCharacterMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
- }
- */
-
-
- proc changeMenusVisibility(string $menus[], int $visible)
- {
- int $i;
- int $menuSize = size($menus);
-
- for ($i = 0; $i < $menuSize; $i++) {
- if (`menu -q -exists $menus[$i]`) {
- menu -e -vis $visible $menus[$i];
- }
- }
- }
-
-
- global proc updateMenuModeUI()
- //
- // Description:
- // This procedure responds to the "MenuModeChanged" event and
- // updates the visibility of the corresponding menus in the
- // menu bar of the main Maya window.
- //
- // This procedure also determines what menu modes are valid,
- // and if an invalid menu mode was set to the "setMenuMode"
- // command, then this procedure will set it back to "Animation"
- // by default.
- //
- {
- global string $gModelingMenus[6];
- global string $gAnimationMenus[6];
- // global string $gCharacterMenus[4];
- global string $gDynamicsMenus[7];
- global string $gRenderingMenus[4];
- global string $gClothMenus[3];
- global string $gLiveMenus[5];
- global string $gMenuModeButton;
- global string $gMayaMode;
-
- string $state = `setMenuMode`;
-
- // don't change to new mode, unless it is loaded
- //
- int $stateAsInt;
- string $newState = $state;
-
- if ($state == "Cloth")
- if ( !(`exists cpSolver`) || !(`menuItem -q -exists clothMode`) )
- $newState = "Animation";
-
- if ($state == "Live")
- if ( !(`exists mlSolveCamera`) || !(`menuItem -q -exists liveMode`) )
- $newState = "Animation";
-
- int $dynamicsOffset = 0;
- if( `licenseCheck -m edit -type complete` == 0 )
- {
- $dynamicsOffset = -1;
- if( $state == "Dynamics" )
- {
- $newState = "Animation";
- }
- }
-
- switch( $newState ) {
- case "Modeling":
- // text -e -l "Modeling" -w 90 modeText;
- changeMenusVisibility($gModelingMenus, true);
- changeMenusVisibility($gAnimationMenus, false);
- // changeMenusVisibility($gCharacterMenus, false);
- changeMenusVisibility($gDynamicsMenus, false);
- changeMenusVisibility($gRenderingMenus, false);
- changeMenusVisibility($gClothMenus, false);
- changeMenusVisibility($gLiveMenus, false);
- $stateAsInt = 2;
- break;
- case "Animation":
- // text -e -l "Animation" -w 90 modeText;
- changeMenusVisibility($gModelingMenus, false);
- changeMenusVisibility($gAnimationMenus, true);
- // changeMenusVisibility($gCharacterMenus, true);
- changeMenusVisibility($gDynamicsMenus, false);
- changeMenusVisibility($gRenderingMenus, false);
- changeMenusVisibility($gClothMenus, false);
- changeMenusVisibility($gLiveMenus, false);
- $stateAsInt = 1;
- break;
- case "Dynamics":
- // text -e -l "Dynamics" -w 90 modeText;
- changeMenusVisibility($gModelingMenus, false);
- changeMenusVisibility($gAnimationMenus, false);
- // changeMenusVisibility($gCharacterMenus, false);
- changeMenusVisibility($gDynamicsMenus, true);
- changeMenusVisibility($gRenderingMenus, false);
- changeMenusVisibility($gClothMenus, false);
- changeMenusVisibility($gLiveMenus, false);
- $stateAsInt = 3;
- break;
- case "Rendering":
- // text -e -l "Rendering" -w 90 modeText;
- changeMenusVisibility($gModelingMenus, false);
- changeMenusVisibility($gAnimationMenus, false);
- // changeMenusVisibility($gCharacterMenus, false);
- changeMenusVisibility($gDynamicsMenus, false);
- changeMenusVisibility($gRenderingMenus, true);
- changeMenusVisibility($gClothMenus, false);
- changeMenusVisibility($gLiveMenus, false);
- $stateAsInt = 4 + $dynamicsOffset;
- break;
- case "Cloth":
- changeMenusVisibility($gClothMenus, true);
- changeMenusVisibility($gModelingMenus, false);
- changeMenusVisibility($gAnimationMenus, false);
- // changeMenusVisibility($gCharacterMenus, false);
- changeMenusVisibility($gDynamicsMenus, false);
- changeMenusVisibility($gRenderingMenus, false);
- changeMenusVisibility($gLiveMenus, false);
- $stateAsInt = 5 + $dynamicsOffset;
- break;
- case "Live":
- changeMenusVisibility($gLiveMenus, true);
- changeMenusVisibility($gModelingMenus, false);
- changeMenusVisibility($gAnimationMenus, false);
- // changeMenusVisibility($gCharacterMenus, false);
- changeMenusVisibility($gDynamicsMenus, false);
- changeMenusVisibility($gRenderingMenus, false);
- changeMenusVisibility($gClothMenus, false);
- $stateAsInt = 5 + $dynamicsOffset;
- break;
- default:
- // If the current mode is not recognized then
- // set the current mode to Animation as the default.
- //
- setMenuMode "Animation";
- return;
-
- }
-
- if (`optionMenu -q -exists $gMenuModeButton` &&
- `optionMenu -q -v $gMenuModeButton` != $newState) {
- optionMenu -e -sl $stateAsInt $gMenuModeButton;
- }
-
- // Check if the selection made for Live/Cloth resulted properly
- // Else the position of Cloth/Live may have to be interchanged.
-
- if((`optionMenu -q -value $gMenuModeButton` == "Cloth" && $newState == "Live") ||
- (`optionMenu -q -value $gMenuModeButton` == "Live" && $newState == "Cloth"))
- {
- $stateAsInt = $stateAsInt + 1;
- optionMenu -e -sl $stateAsInt $gMenuModeButton;
- }
-
- // If Live Menu is getting unselected then hide the Popup
- // Menu used for Live.
-
- if(isUIComponentVisible("Maya Live Control Panel") &&
- $newState != "Live")
- {
- string $component;
- $component = getUIComponent("Maya Live Control Panel");
- layout -edit -manage false $component;
- }
-
- optionVar -sv currentMenuBarTab $newState;
- $gMayaMode = $state;
- }
-
-
- // note: i don't think this proc is ever called. this logic now all
- // appears to be in statusLine.mel (Kevin Smith)
- //
- global proc genModePopupMenu( string $parent )
- {
- setParent -m $parent;
- if( `menu -q -ni $parent` != 0 ) {
- return;
- }
- menuItem -l "Modeling" -c "setMenuMode Modeling";
- menuItem -l "Animation" -c "setMenuMode Animation";
- if( `licenseCheck -m edit -type complete` == 1 )
- {
- menuItem -l "Dynamics" -c "setMenuMode Dynamics";
- }
- menuItem -l "Rendering" -c "setMenuMode Rendering";
- }
-
-
- //global proc initMainMenuBar ( string $menuBarParent )
- {
- // $menuBarParent = $gMainWindow;
- string $menuModeText;
- global string $gModelingMenus[6];
- global string $gAnimationMenus[6];
- // global string $gCharacterMenus[4];
- global string $gDynamicsMenus[7];
- global string $gRenderingMenus[4];
-
- int $Modeling = 0;
- int $Animation = 1;
- int $Dynamics = 3;
- int $Rendering = 4;
- int $menuIndex;
-
- // These globals are used to name the main menus so that
- // users can add things to the end of the menus without
- // hardcoding the name.
- //
- global string $gMainFileMenu = "mainFileMenu";
- global string $gMainEditMenu = "mainEditMenu";
- global string $gMainModifyMenu = "mainModifyMenu";
- global string $gMainDisplayMenu = "mainDisplayMenu";
- global string $gMainWindowMenu = "mainWindowMenu";
- global string $gMainOptionsMenu = "mainOptionsMenu";
- global string $gMainCreateMenu = "mainCreateMenu";
-
- global string $gMainWindow;
-
- // Create Menu bar text field
- // setParent $menuBarFormName;
- // $menuModeText = `text -l "Modeling" -w 90 modeText`;
-
- //////////////////////////////////////////////////
- //
- // Build the COMMON menu panes
- //
- //////////////////////////////////////////////////
-
- setParent $gMainWindow;
-
- if (`isTrue "BaseMayaExists"`) {
- if (`exists FileMenu`) {
- eval "source FileMenu";
- }
- if (`exists EditMenu`) {
- eval "source EditMenu";
- }
- $menu = `menu -l "Modify" -aob true -to true
- -familyImage "menuIconModify.xpm"
- $gMainModifyMenu`;
- menu -e -pmc ( "ModObjectsMenu " + $menu ) $menu;
- setParent -m ..;
-
- // The Create menu
- menu -l "Create" -aob true -to true
- -postMenuCommandOnce true
- -familyImage "menuIconEdit.xpm"
- $gMainCreateMenu;
- menu -e -pmc ( "ModCreateMenu " + $gMainCreateMenu )
- $gMainCreateMenu;
- setParent -m ..;
-
- if (`exists DisplayMenu`) {
- eval "source DisplayMenu";
- }
- if (`exists ViewMenu`) {
- eval "source ViewMenu";
- }
-
- if (`exists HotboxMenus`) {
- eval "source HotboxMenus";
- }
-
- // Register some default Marking Menus with the Marking Menu Editor.
- //
- {
- if (!`exists registerMenuWithMenuEditor` || !`exists isMenuRegisteredWithMenuEditor`) {
- eval "source menuEditorSetup";
- }
- if (`exists registerMenuWithMenuEditor` && `exists isMenuRegisteredWithMenuEditor`) {
- string $markingMenuAnnotation = "PA_Style_LMB";
- if (!isMenuRegisteredWithMenuEditor($markingMenuAnnotation))
- registerMenuWithMenuEditor(("menu_" + $markingMenuAnnotation),$markingMenuAnnotation);
-
- $markingMenuAnnotation = "PA_Style_MMB";
- if (!isMenuRegisteredWithMenuEditor($markingMenuAnnotation))
- registerMenuWithMenuEditor(("menu_" + $markingMenuAnnotation),$markingMenuAnnotation);
-
- $markingMenuAnnotation = "PA_Style_RMB";
- if (!isMenuRegisteredWithMenuEditor($markingMenuAnnotation))
- registerMenuWithMenuEditor(("menu_" + $markingMenuAnnotation),$markingMenuAnnotation);
- }
- else {
- warning "Cannot register menus with the Marking Menu Editor";
- }
- }
- }
-
-
- //////////////////////////////////////////////////
- //
- // Build the MODELLING menus
- //
- //////////////////////////////////////////////////
-
- // These globals are used to name the main menus so that
- // users can add things to the end of the menus without
- // hardcoding the name.
- //
- global string $gMainEditCurvesMenu = "mainEditCurvesMenu";
- global string $gMainSurfacesMenu = "mainSurfacesMenu";
- global string $gMainEditSurfacesMenu = "mainEditSurfacesMenu";
- global string $gMainPolygonsMenu = "mainPolygonsMenu";
- global string $gMainEditPolygonsMenu = "mainEditPolygonsMenu";
- global string $gMainSubdivSurfacesMenu = "mainSubdivSurfacesMenu";
- // Some of the obsolete ones, but we don't want people's
- // menu items to disappear just like that.
- global string $gMainPrimitivesMenu = "mainCreateMenu";
- global string $gMainCurvesMenu = "mainEditCurvesMenu";
-
- setParent $gMainWindow;
- $menuIndex = 0;
-
- $gModelingMenus[$menuIndex] =
- `menu -l "Edit Curves" -aob true -to true
- -postMenuCommandOnce false
- -familyImage "menuIconEditCurves.xpm"
- $gMainEditCurvesMenu`;
- menu -e -pmc ( "ModEditCurvesMenu " + $gModelingMenus[$menuIndex] )
- $gModelingMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- $gModelingMenus[$menuIndex] =
- `menu -l "Surfaces" -aob true -to true
- -postMenuCommandOnce false
- -familyImage "menuIconSurfaces.xpm"
- $gMainSurfacesMenu`;
- menu -e -pmc ( "ModCreateSurfacesMenu " + $gModelingMenus[$menuIndex] )
- $gModelingMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- if( `isTrue "SurfaceUIExists"` ) {
- $gModelingMenus[$menuIndex] =
- `menu -l "Edit NURBS" -aob true -to true
- -postMenuCommandOnce false
- -familyImage "menuIconEditSurfaces.xpm"
- $gMainEditSurfacesMenu`;
- menu -e -pmc ("ModEditSurfacesMenu " +
- $gModelingMenus[$menuIndex]) $gModelingMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
- }
-
- $gModelingMenus[$menuIndex] =
- `menu -l "Polygons" -aob true -to true
- -postMenuCommandOnce true
- -familyImage "menuIconPolygons.xpm"
- $gMainPolygonsMenu`;
- menu -e -pmc ( "PolygonsMenu " + $gModelingMenus[$menuIndex] )
- $gModelingMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- $gModelingMenus[$menuIndex] =
- `menu -l "Edit Polygons" -aob true -to true
- -postMenuCommandOnce false
- -familyImage "menuIconPolygons.xpm"
- $gMainEditPolygonsMenu`;
- menu -e -pmc ( "EditPolygonsMenu " + $gModelingMenus[$menuIndex] )
- $gModelingMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
-
- if (`isTrue "SubdivUIExists"`) {
- $gModelingMenus[$menuIndex] =
- `menu -l "Subdiv Surfaces" -aob true -to true
- -postMenuCommandOnce true
- -familyImage "menuIconSubdivSurf.xpm"
- $gMainSubdivSurfacesMenu`;
- menu -e -pmc ( "SubdivSurfacesMenu " + $gModelingMenus[$menuIndex] )
- $gModelingMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
- }
-
- //////////////////////////////////////////////////
- //
- // Build the ANIMATION menus
- //
- //////////////////////////////////////////////////
-
- // These globals are used to name the main menus so that
- // users can add things to the end of the menus without
- // hardcoding the name.
- //
- global string $gMainKeysMenu = "mainKeysMenu";
- global string $gMainSkeletonsMenu = "mainSkeletonsMenu";
- global string $gMainDeformationsMenu = "mainDeformationsMenu";
- global string $gMainSkinningMenu = "mainSkinningMenu";
- global string $gMainConstraintsMenu = "mainConstraintsMenu";
- global string $gMainCharactersMenu = "mainCharactersMenu";
-
- setParent $gMainWindow;
- $menuIndex = 0;
-
- $gAnimationMenus[$menuIndex] =
- `menu -l "Animate" -aob true -to true
- -postMenuCommandOnce true
- -familyImage "menuIconKeys.xpm"
- $gMainKeysMenu`;
- menu -e -pmc ( "AniAnimateMenu " + $gAnimationMenus[$menuIndex] )
- $gAnimationMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- $gAnimationMenus[$menuIndex] =
- `menu -l "Deform" -to true -aob true
- -postMenuCommandOnce true
- -familyImage "menuIconDeformations.xpm"
- $gMainDeformationsMenu`;
- menu -e -pmc ( "ChaDeformationsMenu " + $gAnimationMenus[$menuIndex] )
- $gAnimationMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- $gAnimationMenus[$menuIndex] =
- `menu -l "Skeleton" -to true -aob true
- -postMenuCommandOnce false
- -familyImage "menuIconSkeletons.xpm"
- $gMainSkeletonsMenu`;
- menu -e -pmc ( "ChaSkeletonsMenu " + $gAnimationMenus[$menuIndex] )
- $gAnimationMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- $gAnimationMenus[$menuIndex] =
- `menu -l "Skin" -to true -aob true
- -postMenuCommandOnce true
- -familyImage "menuIconSkinning.xpm"
- $gMainSkinningMenu`;
- menu -e -pmc ( "ChaSkinningMenu " + $gAnimationMenus[$menuIndex] )
- $gAnimationMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- $gAnimationMenus[$menuIndex] =
- `menu -l "Constrain" -to true -aob true
- -postMenuCommandOnce true
- -familyImage "menuIconConstraints.xpm"
- $gMainConstraintsMenu`;
- menu -e -pmc ( "AniConstraintsMenu " + $gAnimationMenus[$menuIndex] )
- $gAnimationMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- $gAnimationMenus[$menuIndex] =
- `menu -l "Character" -to true -aob true
- -postMenuCommandOnce false
- -familyImage "menuIconCharacters.xpm"
- $gMainCharactersMenu`;
- menu -e -pmc ( "AniCharactersMenu " + $gAnimationMenus[$menuIndex] )
- $gAnimationMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- //////////////////////////////////////////////////
- //
- // Build the DYNAMICS menus
- //
- //////////////////////////////////////////////////
-
- // These globals are used to name the main menus so that
- // users can add things to the end of the menus without
- // hardcoding the name.
- //
- global string $gMainDynSettingsMenu = "mainDynSettingsMenu";
- global string $gMainParticlesMenu = "mainParticlesMenu";
- global string $gMainFluidsMenu = "mainFluidsMenu";
- global string $gMainFieldsMenu = "mainFieldsMenu";
- global string $gMainDynConnectMenu = "mainDynConnectMenu";
- global string $gMainDynBodiesMenu = "mainDynBodiesMenu";
- global string $gMainDynEffectsMenu = "mainDynEffectsMenu";
-
- if( `licenseCheck -m edit -type complete` == 1 )
- {
- if (`optionVar -q loadDynamics` || !`optionVar -ex loadDynamics`)
- {
- setParent $gMainWindow;
- $menuIndex = 0;
-
- $gDynamicsMenus[$menuIndex] =
- `menu -l "Particles" -aob true -to true
- -postMenuCommandOnce true
- -familyImage "menuIconParticles.xpm"
- $gMainParticlesMenu`;
- menu -e -pmc ( "DynParticlesMenu " + $gDynamicsMenus[$menuIndex] )
- $gDynamicsMenus[$menuIndex];
- $menuIndex++;
-
-
- int $dynamicsIsLicensed =
- `licenseCheck -mode "edit" -type "fx"`;
- if (!$dynamicsIsLicensed)
- {
- menu -e -enable false $gMainParticlesMenu;
- }
-
- setParent -m ..;
-
- int $fluidsIsLicensed = fluidEditLicenseFound();
- if ( $fluidsIsLicensed ) {
- $gDynamicsMenus[$menuIndex] =
- `menu -l "Fluid Effects" -aob true -to true
- -postMenuCommandOnce true
- -familyImage "menuIconFluids.xpm"
- $gMainFluidsMenu`;
- menu -e -pmc ( "DynCreateFluidsMenu " + $gDynamicsMenus[$menuIndex] )
- $gDynamicsMenus[$menuIndex];
- setParent -m ..;
- }
- else {
- $gDynamicsMenus[$menuIndex] = "none";
- }
- $menuIndex++;
-
- $gDynamicsMenus[$menuIndex] =
- `menu -l "Fields" -aob true -to true
- -postMenuCommandOnce true
- -familyImage "menuIconFields.xpm"
- $gMainFieldsMenu`;
- menu -e -pmc ( "DynCreateFieldsMenu " + $gDynamicsMenus[$menuIndex] )
- $gDynamicsMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- //$gDynamicsMenus[$menuIndex] = `menu -l "Connect/Add" -to true
- // -postMenuCommandOnce true
- // -familyImage "menuIconConnect.xpm"
- // $gMainDynConnectMenu`;
- // menu -e -pmc ( "DynConnectMenu " + $gDynamicsMenus[$menuIndex] )
- // $gDynamicsMenus[$menuIndex];
- // $menuIndex++;
- //setParent -m ..;
-
- $gDynamicsMenus[$menuIndex] =
- `menu -l "Soft/Rigid Bodies" -aob true -to true
- -postMenuCommandOnce true
- -familyImage "menuIconBodies.xpm"
- $gMainDynBodiesMenu`;
- // `menu -l "Soft/Rigid Body" -aob true -to true`;
- menu -e -pmc ( "DynSoftRigidBodyMenu " + $gDynamicsMenus[$menuIndex] )
- $gDynamicsMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- $gDynamicsMenus[$menuIndex] =
- `menu -l "Effects" -aob true -to true
- -postMenuCommandOnce true
- -familyImage "menuIconBodies.xpm"
- $gMainDynEffectsMenu`;
- menu -e -pmc ( "DynClipEffectsMenu " + $gDynamicsMenus[$menuIndex] )
- $gDynamicsMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- $gDynamicsMenus[$menuIndex] = `menu -l "Solvers" -aob true -to true
- -postMenuCommandOnce true
- -familyImage "menuIconSettings.xpm"
- $gMainDynSettingsMenu`;
- menu -e -pmc ( "DynSettingsMenu " + $gDynamicsMenus[$menuIndex] )
- $gDynamicsMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- }
- }
-
-
- //////////////////////////////////////////////////
- //
- // Build the RENDERING menus
- //
- //////////////////////////////////////////////////
-
- // These globals are used to name the main menus so that
- // users can add things to the end of the menus without
- // hardcoding the name.
- //
- global string $gMainShadingMenu = "mainShadingMenu";
- global string $gMainRenTexturingMenu = "mainRenTexturingMenu";//cm
- global string $gMainRenderMenu = "mainRenderMenu";
-
- // The light menu was removed for Maya 3.0
- // Setting this global to the shading menu to not break
- // customer scripts
- //
- global string $gMainLightingMenu = "mainShadingMenu";
-
- if (`optionVar -q loadRendering` || !`optionVar -ex loadRendering`)
- {
- setParent $gMainWindow;
- $menuIndex = 0;
-
- $gRenderingMenus[$menuIndex] =
- `menu -l "Lighting/Shading" -aob true -to true
- -postMenuCommandOnce true
- -familyImage "menuIconShading.xpm"
- $gMainShadingMenu`;
- menu -e -pmc ( "RenShadersMenu " + $gRenderingMenus[$menuIndex] )
- $gRenderingMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- //cm
- $gRenderingMenus[$menuIndex] =
- `menu -l "Texturing" -aob true -to true
- -postMenuCommandOnce true
- -familyImage "menuIconTexturing.xpm"
- $gMainRenTexturingMenu`;
- menu -e -pmc ( "RenTexturingMenu " + $gRenderingMenus[$menuIndex] )
- $gRenderingMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
-
- $gRenderingMenus[$menuIndex] =
- `menu -l "Render" -aob true -to true -pmo true
- -familyImage "menuIconRender.xpm"
- $gMainRenderMenu`;
- menu -e -pmo 0 -pmc ( "RenRenderMenu " + $gRenderingMenus[$menuIndex] )
- $gRenderingMenus[$menuIndex];
- $menuIndex++;
- setParent -m ..;
- }
-
- //////////////////////////////////////////////////////////////////
- //
- // Maya Paint Effects
- //
- //////////////////////////////////////////////////////////////////
- if (`isTrue MayaCreatorExists`) {
- eval "source CreatorMenu";
-
- }
-
- //////////////////////////////////////////////////////////////////
- //
- // Note: Maya Unlimited Plug-In Menus are built in their UI init
- // sections. (ie cloth,live)
- //
- //////////////////////////////////////////////////////////////////
-
-
- //////////////////////////////////////////////////
- //
- // Build the help and auxiliary menus
- //
- //////////////////////////////////////////////////
-
- if (`exists AuxiliaryMenus`) {
- eval "source AuxiliaryMenus";
- }
- if (`exists AuxiliaryGraphicsMenus.mel`) {
- eval "source AuxiliaryGraphicsMenus";
- }
- if (`exists HelpMenu`) {
- eval "source HelpMenu";
- }
-
- // Get the current menu mode from the preferences.
- // If the one in the preferences isn't recognized, then
- // default to Animation.
- //
- string $menuMode = `optionVar -query currentMenuBarTab`;
- if($menuMode != "Modeling"
- && $menuMode != "Animation"
- && $menuMode != "Dynamics"
- && $menuMode != "Rendering"
- && $menuMode != "Cloth"
- && $menuMode != "Live") {
- $menuMode = "Animation";
- }
- setMenuMode $menuMode;
- updateMenuModeUI;
-
- // When the menu mode changes, make sure that the menus are updated.
- //
- scriptJob -permanent -event "MenuModeChanged" "updateMenuModeUI";
- }
-
-